<?$this->load->view('admin/header');?>
<!-- Content Area -->
<div id="middlepart">
    <!-- Left column -->
    <div id="leftcolumn">

        <h1>Category Management</h1>

        <?$this->load->view('admin/system_messages');?>

        <!-- Tables 1 -->
        <table border="0" cellspacing="0" cellpadding="0" width="100%">
            <thead>
                <tr>
                    <th>ID</th>
                    <th>Category</th>
                    <th>URL Title</th>
                    <th>Default Category</th>
                    <th>Actions</th>
                </tr>
            </thead>
            <tbody>
                <?foreach ($this->mdl_categories->get(array('paginate'=>TRUE)) as $category) {?>
                <tr>
                    <td><?=$category->category_id;?></td>
                    <td><?=$category->category;?></td>
                    <td><?=$category->url_title;?></td>
                    <td><?if($category->is_default) {echo"Yes";}else {echo anchor('admin_categories/set_default/category_id/' . $category->category_id, 'No');}?></td>
                    <td width="125px">
                            <?=anchor('admin_categories/form/category_id/' . $category->category_id, 'edit', array('class'=>'edit'));?>
                            <?if(!$category->is_default) {echo anchor('admin_categories/delete/category_id/' . $category->category_id, 'delete', array('class'=>'delete', 'onclick'=>$this->inktype->verify_delete()));}?>
                    </td>
                </tr>
                <?}?>
            </tbody>
        </table>
        <!-- Tables 1 -->
        <br />
        <div style="text-align: center;"><?=$this->mdl_categories->page_links;?></div>
        <br />
    </div>
    <!-- Left Column -->
    <?$this->load->view('admin/categories_side_box');?>
</div>
<!-- Content -->

<?$this->load->view('admin/footer');?>